#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    int minOperations(vector<string>& logs) {
        int count = 0;
        for (auto& e : logs)
        {
            if (e[0] == e[1] && e[0] == '.')
            {
                count = count > 0 ? count - 1 : count;
            }
            else if (e[0] != '.')
            {
                ++count;
            }
        }
        return count;
    }
};